//
//  DestinationCityCell.m
//  TravelToHelp
//
//  Created by lanou3g on 15/10/28.
//  Copyright © 2015年 冯贵宾. All rights reserved.
//

#import "DestinationCityCell.h"

@interface DestinationCityCell ()

@property (nonatomic, strong) UIImageView *photoView;
@property (nonatomic, strong) UILabel *lable;
@property (nonatomic, strong) UIImageView *nextImage;

@end

@implementation DestinationCityCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.photoView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        self.photoView.backgroundColor = [UIColor whiteColor];
        
        self.photoView.layer.cornerRadius = 10;
        self.photoView.layer.masksToBounds = YES;
        
        self.lable = [[UILabel alloc] initWithFrame:CGRectMake(20, self.photoView.height - 35, 120, 30)];
       // lable.backgroundColor = [UIColor redColor];
        self.lable.font = [UIFont systemFontOfSize:16];
        self.lable.text = @"苏州";
        self.lable.textColor = [UIColor whiteColor];
        [self.photoView addSubview:self.lable];
        [self addSubview:self.photoView];
        
        self.nextImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 50, 50)];
    }
    return self;
}

- (void)setModel:(DestinationCityModel *)model
{
    [self.photoView sd_setImageWithURL:[NSURL URLWithString:model.cover_s] placeholderImage:[UIImage imageNamed:@"placeholderF.png"]];
    self.lable.text = model.name;
    
    [self.nextImage sd_setImageWithURL:[NSURL URLWithString:model.cover] placeholderImage:[UIImage imageNamed:@"placeholderF.png"]];
}



@end









